{% extends "base.html" %}
{% block title %}公众号管理平台{% endblock %}
{% block content %}
<div id="popup">
  <div id="topping">
    <span id="conftext"></span>
  </div>
  <div id="confcontent" class="confcontent">
      <span id="conflabel" class="conflabel"></span>
      <div id="confinfo" class="confinfo">
      </div>
      <div id="conftable" class="table-responsive conftable"></div>
      <div id="confedit" class="confedit"></div>
  </div>
  <div id="embedding">
    <a href="javascript:;" id="confqueding" class="confqueding">确定</a>
    <a href="javascript:;" id="confquxiao" class="confquxiao">取消</a>
  </div>
</div>
<div id="page-inner">
    <div class="panel-body">
     <div class="row">
        <div class="col-md-12">
            <h1 class="page-head-line">服务控制</h1>
        </div>
         <div class="row">
               <div class="col-md-11">
                    <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>客户名称</th>
                                <th>运营状态</th>
                                <th>服务状态</th>
                                <th>服务版本</th>
                                <th>服务节点</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for c in customs %}
                            <tr id="{{ c.server }}">
                                <td>{{ c.id }}</td>
                                <td><a href="{{ c.url }}" target="_blank">{{ c.name }}</a></td>
                                <td><span class="label label-{{ c.stateclass }}">{{ c.state }}</span></td>
                                <td><span class="label label-{{ c.statusclass }}">{{ c.status }}</span></td>
                                <td>{{ c.version }}</td>
                                <td>{{ c.node }}</td>
                                <td class="column">
                                    {% if  c.status != "running" %}
                                        <button class="btn btn-sm btn-warning" data-modal="modal-1" title="{{ c.name }}" onclick="qidong(this.title,'{{ c.server }}')">启动</button>
                                    {% else %}
                                        <button class="btn btn-sm btn-warning" data-modal="modal-2" title="">停止</button>
                                        <button class="btn btn-sm btn-warning" data-modal="modal-3" title="">重启</button>
                                    {% endif %}
                                        <button class="btn btn-sm btn-warning" data-modal="modal-4" title="{{ c.name }}" onclick="verup(this.title,'{{ c.server }}')">版本升级</button>
                                        <button class="btn btn-sm btn-warning" data-modal="modal-5" title="" onclick="verback('{{ c.name }}','{{ c.server }}')">版本回滚</button>
                                        <button class="btn btn-sm btn-warning" data-modal="modal-6" title="{{ c.name }} " onclick="conf(this.title,'{{ c.server }}')">启动配置变更</button>
                                        <!--<button class="btn btn-sm btn-warning" data-modal="modal-7" title="">配置表修改</button>-->
                                        <button class="btn btn-sm btn-warning" data-modal="modal-8" title="" onclick="execlog('{{ c.name }}','{{ c.server }}')">操作记录</button>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                </div>
        </div>
    </div>
</div>
    </div>
{% endblock %}


